const Sequelize = require('sequelize')
const db = require('../db')
//定义地址实体对象模型
const Address = db.define(
  'Address',
  {
    id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true },
    contact: { type: Sequelize.STRING },
    addressDesc: { type: Sequelize.STRING },
    postCode: { type: Sequelize.STRING },
    tel: { type: Sequelize.STRING },
    createdBy: { type: Sequelize.BIGINT },
    createdAt: { type: Sequelize.DATE },
    modifyBy: { type: Sequelize.BIGINT },
    updatedAt: { type: Sequelize.DATE },
    userId: { type: Sequelize.BIGINT },
  },
  {
    underscored: true,
    tableName: 'smbms_address',
  }
)

module.exports = Address
